﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TQuestion_List.aspx.cs" Inherits="ExamSystem.ht.TQuestion_List" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>试题管理</title>
	<meta charset="utf-8"/>
	<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui/css/H-ui.min.css" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui.admin/css/H-ui.admin.css" />
	<link rel="stylesheet" type="text/css" href="../h-ui/lib/Hui-iconfont/1.0.8/iconfont.css" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui.admin/skin/default/skin.css" id="skin" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui.admin/css/style.css" />
	<script type="text/javascript" src="../h-ui/lib/jquery/1.9.1/jquery.min.js"></script> 
	<script type="text/javascript" src="../h-ui/lib/layer/2.4/layer.js"></script>
	<!--请在下方写此页面业务相关的脚本-->
	<script type="text/javascript">
		/*删除*/
		function del(id) {
		    layer.confirm('确认要删除吗？', {icon:0},function(index){
			    document.location.href = "TQuestion_List.aspx?id=" + id;
			});
		}
	</script>
</head>
<body>
    <form id="form1" runat="server" class="Huiform">
    <div>
        <nav class="breadcrumb">
		    <i class="Hui-iconfont">&#xe67f;</i> 
		    首页 <span class="c-gray en">&gt;</span> 
		    试题信息 <span class="c-gray en">&gt;</span> 
		    试题管理 
		    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.href='TQuestion_List.aspx';" title="刷新" >
			    <i class="Hui-iconfont">&#xe68f;</i>
		    </a>
	    </nav>
	    <div class="page-container">
		    <div class="text-c"> 课程：
                <span class="select-box" style="width:150px">
					<select class="select" size="1" runat="server" id="tkcId">
						<option value="0" selected="selected">全部</option>
					</select>
				</span>
			    &nbsp;&nbsp;&nbsp;&nbsp;
                题目：<input type="text" runat="server" id="tqName" placeholder=" 支持模糊查询" style="width:250px" class="input-text"/>
                <asp:Button ID="btnQuery" runat="server" CssClass="btn btn-success" Text="  查询  " OnClick="btnQuery_Click" />
		    </div>
		    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
			    <span class="l">
				    <a class="btn btn-primary radius" onclick="location.href='TQuestion_Add.aspx'" href="javascript:;">
					    <i class="Hui-iconfont">&#xe600;</i> 添加试题</a>
			    </span> 
			    <span class="r">共有数据：<strong><label id="lbTotal" runat="server">0</label> </strong> 条</span> </div>
		    <div class="mt-20">
			    <table class="table table-border table-bordered table-bg table-hover table-sort">
		           
                            <thead>
					            <tr class="text-c">
						            <th width="5%">ID</th>
						            <th width="15%">课程</th>
						            <th width="60%">题目</th>
						            <th width="5%">类型</th>
						            <th width="5%">分值</th>
						            <th width="10%">操作</th>
					            </tr>
				            </thead>
                    <asp:Repeater ID="Repeater1" runat="server">
                        <ItemTemplate>
					        <tr class="text-c" >
						        <td><%# Eval("tqId") %></td>
						         <td><%# Eval("TkcId.tkcName") %></td>
						            <td name="tqName"><%# Eval("tqName") %></td>
                                    <td><%# Eval("tqtype") %></td>
						            <td><%# Eval("tqScore") %></td>
						        <td class="td-manage">
                                    <a style="text-decoration:none" class="ml-5" onclick="location.href='TQuestion_Info.aspx?id=<%# Eval("tqId") %>'" href="javascript:;" title="查看">
								        <i class="Hui-iconfont">&#xe665;</i>
							        </a>
							        <a style="text-decoration:none" class="ml-5" onclick="location.href='TQuestion_Edit.aspx?id=<%# Eval("tqId") %>'" href="javascript:;" title="编辑">
								        <i class="Hui-iconfont">&#xe6df;</i>
							        </a> 
							        <a style="text-decoration:none" class="ml-5" onclick="del('<%# Eval("tqId") %>')" href="javascript:;" title="删除">
								        <i class="Hui-iconfont">&#xe6e2;</i>
							        </a>
						        </td>
					        </tr>
                            </ItemTemplate>
                      </asp:Repeater>
			    </table>
                </div>
                <div class="cl pd-5 bg-1 bk-gray mt-20">
                    <!-- 当前页码和每页记录数 -->
                     <input type="hidden" id="pageNo" value="1" runat="server" />
                     <input type="hidden" id="pageSize" value="15" runat="server" />
			         <span class="r">共 <strong><label id="lbPageCount" runat="server">0</label></strong> 页 当前第 <strong><label id="lbPageNo" runat="server">0</label></strong> 页</span> 
                     <asp:Button ID="btnFirst" runat="server" Text="首页" CssClass="btn btn-primary radius" Enabled="false" OnClick="btnFirst_Click"/>
                     <asp:Button ID="btnUp" runat="server" Text="上页" CssClass="btn btn-primary radius" Enabled="false" OnClick="btnUp_Click"/>
                     <asp:Button ID="btnDown" runat="server" Text="下页" CssClass="btn btn-primary radius" Enabled="false" OnClick="btnDown_Click"/>
                     <asp:Button ID="btnLast" runat="server" Text="尾页" CssClass="btn btn-primary radius" Enabled="false" OnClick="btnLast_Click"/>
		        </div>
	    </div>
    </div>
    </form>
    <script>
        //防止题目名称过长
        var tds = document.getElementsByName("tqName");
        for (var i = 0; i < tds.length; i++) {
            if (tds[i].innerText.length >= 50) {
                tds[i].innerText = tds[i].innerText.substring(0,50);
            }
        }
    </script>
</body>
</html>
